/*
 * @Author: your name
 * @Date: 2021-10-30 23:40:48
 * @LastEditTime: 2021-12-11 09:58:41
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \phone\src\enter_item.cpp
 */
#include "enter_item.h"
#include "interface.h"
EnterItem::EnterItem(std::unique_ptr<Widget> &page) : PrimaryContrl(page)
{
    SetEnterItem(true);
}
EnterItem::~EnterItem()
{
    EnterItemExit();
}
void EnterItem::ItemSelected()
{
    EnterItemInit();
}
void EnterItem::ResetKeyCmd(KeyCmdMapTable &keyEvent)
{
    // keyEvent.table[static_cast<int>(KeyboardValue::KEY_DIRECTION_LEFT)] = KeyCmd::KEY_CMD_CONTRL_SECOND_PAGE;
    // keyEvent.table[static_cast<int>(KeyboardValue::KEY_DIRECTION_RIGHT)] = KeyCmd::KEY_CMD_CONTRL_SECOND_PAGE;
    // keyEvent.table[static_cast<int>(KeyboardValue::KEY_SOFT_KEY_3)] = KeyCmd::KEY_SOFT_KEY_4;
    keyEvent.table[static_cast<int>(KeyboardValue::KEY_SOFT_KEY_4)] = KeyCmd::KEY_SOFT_KEY_4;
    keyEvent.table[static_cast<int>(KeyboardValue::KEY_OK)] = KeyCmd::KEY_SOFT_KEY_4;
    PageHandle *window = (PageHandle *)Interface::GetInstance().GetCurrentWin();
    window->SetKeyEvent(keyEvent);
}